Skip to content

fix: remove explicit connection_pool dependency to allow 3.x - #394

Merged
chrisarcand merged 1 commit into
masterfrom
allow-connection-pool-3
Mar 31, 2026
Merged

fix: remove explicit connection_pool dependency to allow 3.x#394
chrisarcand merged 1 commit into
masterfrom
allow-connection-pool-3

Conversation

@chrisarcand

Copy link
Copy Markdown
Member

Removes the explicit connection_pool ~> 2.4 runtime dependency that was preventing use of connection_pool 3.x (required by sidekiq 8.1+).

The gem is already managed as a transitive dependency by net-http-persistent 4.0.8, which supports connection_pool >= 2.2.4, < 4. Since we don't directly use connection_pool's API, there's no need to declare it explicitly.

Fixes #393

Removes the explicit connection_pool ~> 2.4 runtime dependency that was
preventing use of connection_pool 3.x (required by sidekiq 8.1+).

The gem is already managed as a transitive dependency by
net-http-persistent 4.0.8, which supports connection_pool >= 2.2.4, < 4.
Since we don't directly use connection_pool's API, there's no need to
declare it explicitly.

Fixes #393
@chrisarcand
chrisarcand requested a review from a team as a code owner February 10, 2026 15:32
@nevans

nevans commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

FWIW, there is still the ugly timeout hack that reaches into the connection pool's internals, and is more likely to break between major versions.

        @nhp = Net::HTTP::Persistent.new(name: "vault-ruby", pool_size:)
        @nhp.pool.instance_variable_set(:@timeout, pool_timeout)

That doesn't need to block this PR... but it might be worth converting that into an upstream PR (or two).

@nevans

nevans commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

Related, dependabot can be configured to "widen" the gem deps. That should be able to automatically create PRs like this:

- spec.add_runtime_dependency "connection_pool",     "~> 2.4"
+ spec.add_runtime_dependency "connection_pool",     ">= 2.4, < 4"

(Obviously, it'd be better to simply remove the direct dep on connection_pool internals!)

@fwininger

Copy link
Copy Markdown

🥇

@chrisarcand
chrisarcand merged commit 8b5a321 into master Mar 31, 2026
27 checks passed
@chrisarcand
chrisarcand deleted the allow-connection-pool-3 branch March 31, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow use of connection_pool 3.0

4 participants